<?php
namespace GRH\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\EventManager\EventManagerInterface;

class BaseController extends AbstractActionController
{
    public function setEventManager(EventManagerInterface $events)
    {
        parent::setEventManager($events);
 
        $controller = $this;
        $events->attach('dispatch', function ($e) use ($controller) {
            $controller->layout()->setTemplate('layout/grh');
        }, 100);
 
        return $this;
    }
    
    public function getService($name)
    {
        return $this->getServiceLocator()->get($name);
    }
    
    public function indexAction()
    {
        return array();
    }
}